#pragma once

#include "../Common/Thread.h"
#include "Data.h"

class ReaderThread : public CThread
{
public:
    ReaderThread(Data* data)
        : CThread(), data(data)
    {
    }
    ~ReaderThread()
    {
    }

public:
    void run()
    {
        while(true)
        {
            const std::string readbuf = data->read();
            printf("Thread %d reads %s\n", GetCurrentThreadId(), readbuf.c_str());
        }
    }
private:
    Data* data;
};